export {}

/* 
  只读数组
    - 数组中的元素只能读不能修改
      - ReadonlyArray<元素类型>

  只读集合
    - Map
      - ReadonlyMap<键的类型, 值的类型>
    - Set
      - ReadonlySet<值的类型>
*/

// const arr: ReadonlyArray<number> = [1, 2, 3, 4, 5]
const arr: readonly number[] = [1, 2, 3, 4, 5]

const map: ReadonlyMap<string, number> = new Map([
  ["one", 1],
  ["two", 2],
])

const set: ReadonlySet<string> = new Set(["孙悟空", "猪八戒", "沙和尚"])

for (let item of set) {
  console.log(item)
}

